﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;



namespace THSLib
{
    public class MessageInfo
    {
        //public const String NewObject = "New";
        public const String NewObject = "Mới";
        
        public const String EditObject = "Sửa ";

        public const String EditTemplateObject = "Sửa mẫu";

        public const string SaveTemplateObject = "Lưu mẫu thành công";

        public const String SaveObject = "Lưu thành công! ";
        public const String SearchResults = " have been found";
        public const String PrintSuccess = "Báo cáo này được in ra ";        
        public const String CannotChangeModuleHeader1 = "Phân hệ ";
        public const String CannotChangeModuleHeader2 = "is in modus";
        public const String CannotChangeModuleFooter = "Vui lòng hoàn tất tác vụ!";
        public const String CannotMove = "Không thể chuyển !";


        public const String InitScreenMessage = "Khởi tạo";        
        public const String ShowModuleMessage = "Đang tải phân hệ";
        public const String SearchingMessage = "Tìm kiếm";
        public const String LoadingMessage = "Đang tải...";
        public const String HandoverMessage = "Đang thực hiện giao ca...";
        
        public static String ShowInfoForCurrentObject(String strActiveModuleName,String strLanguage, String strAANumberString)
        {
            String strModuleDesc = new STModuleDescriptionsController().GetDescriptionByModuleNameAndLanguageName(strActiveModuleName, strLanguage);
            String strMessageInfo = String.Format("{0} Nr.: {1}", strModuleDesc, strAANumberString);
            return strMessageInfo;
        }

        public static String ShowInfoForNewAction(String strActiveModuleName,String strLanguage)
        {
            String strModuleDesc = new STModuleDescriptionsController().GetDescriptionByModuleNameAndLanguageName(strActiveModuleName, strLanguage);
            String strMessageInfo =String.Format("{0} {1}", NewObject , strModuleDesc);           
            
            return strMessageInfo;
        }

        public static String ShowInfoForEditAction(String strActiveModuleName,String strLanguage,String strAANumberString)
        {
            String strModuleDesc = new STModuleDescriptionsController().GetDescriptionByModuleNameAndLanguageName(strActiveModuleName, strLanguage);
            String strMessageInfo= String.Format("{0}{1} {2}",EditObject , strModuleDesc ,strAANumberString);
            return strMessageInfo;
        }

        public static String ShowInfoForSaveAction(String strActiveModuleName,String strLanguage, String strAANumberString)
        {
            String strModuleDesc = new STModuleDescriptionsController().GetDescriptionByModuleNameAndLanguageName(strActiveModuleName, strLanguage);
            String strMessageInfo = String.Format("{0}{1} {2}", SaveObject, strModuleDesc, strAANumberString);
            return strMessageInfo;
        }

        public static String ShowInfoForSearchResult(String strActiveModuleName,String strLanguage, int iNumberOfResults)
        {
            String strModuleDesc = new STModuleDescriptionsController().GetDescriptionByModuleNameAndLanguageName(strActiveModuleName, strLanguage);
            String strMessageInfo = String.Format("{0} {1}s {2}", iNumberOfResults, strModuleDesc, SearchResults);
            return strMessageInfo;
        }

        public static DialogResult ShowInfoPrintReportSuccess(String strPrinterName)
        {
            String strMessageInfo = String.Format("{0} {1}", PrintSuccess, strPrinterName);
            return MessageBox.Show(strMessageInfo, "Đang in báo cáo", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

        public static String ShowInfoCurrentModule(String strModuleName,String strLanguage)
        {
            String strModuleDesc = new STModuleDescriptionsController().GetDescriptionByModuleNameAndLanguageName(strModuleName, strLanguage);
            String strMessageInfo = String.Format("{0}", strModuleDesc);
            return strMessageInfo;
        }

        public static DialogResult ShowInfoCannotChangeModule(String strModuleName, String strModusAction,String strLanguage)
        {
            String strModuleDesc = new STModuleDescriptionsController().GetDescriptionByModuleNameAndLanguageName(strModuleName, strLanguage);
            String strMessageInfo = String.Format("{0} {1} {2} {3} {4}", CannotChangeModuleHeader1, strModuleDesc, CannotChangeModuleHeader2, strModusAction, CannotChangeModuleFooter);
            return MessageBox.Show(strMessageInfo, "THS", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

        public static DialogResult ShowInfoCannotMove(String strModusAction)
        {
            String strMessageInfo = String.Format("{0}", CannotMove);
            return MessageBox.Show(strMessageInfo, "THS", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
       
    }
}
